let app = new Vue({
    el:'#whole_font',
    data:{
        name:'',
        motif:[],
        motifid:''

    },
    methods:{
        click:function(value){
            this.motifid = value;
            // console.log('==',value);
        }
    }
});
//删除
$('body').on('click','.delete',function () {
    $.ajax({
        url: '/index.php?s=api/backstage/delete',
        type:'POST',
        data:{
            motifid:app.motifid,
        },
        success:function (value) {
            console.log(value);
            if(value.data === 0){
                window.alert(value.message);
            }else{
                window.alert(value.message);
            }
        }
    });
    return false;
});
$(document).ready(function(){
    $.ajax({
        url:'/index.php?s=api/backstage/backstage_list',
        type:'POST',
        data: {},
        success:function (value) {
            // console.log(value.data[0]);
            app.name = value.data[0];
            app.motif = value.data[1];
            console.log(value);
        }
    });
});
$('body').on('click','.edit',function(){
    $.ajax({
        url: '/index.php?s=api/edit/edit_list',
        type:'POST',
        data:{
        },
        success:function(value){
            window.location.href = '/index.php?s=index/login/login_list';
        }
    });
});